/**
 * 由 WangYu 创建
 * 日期 2017/9/14
 */
import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    TouchableOpacity, TouchableHighlight,TouchableNativeFeedback
} from 'react-native';
import {Actions} from "react-native-router-flux";
export default class ShopCenterItemView extends Component {

    constructor(props) {
        super(props);
    }

    render() {
        let url=this.props.url.replace('imeituan://www.meituan.com/web/?url=','')+'?uuid=5C7B6342814C7B496D836A69C872202B5DE8DB689A2D777DFC717E10FC0B4271&utm_term=6.6&utm_source=AppStore&utm_content=5C7B6342814C7B496D836A69C872202B5DE8DB689A2D777DFC717E10FC0B4271&version_name=6.6&userid=160495643&utm_medium=iphone&lat=23.134709&utm_campaign=AgroupBgroupD100Ghomepage_shoppingmall_detailH0&token=b81UqRVf6pTL4UPLLBU7onkvyQoAAAAAAQIAACQVmmlv_Qf_xR-hBJVMtIlq7nYgStcvRiK_CHFmZ5Gf70DR47KP2VSP1Fu5Fc1ndA&lng=113.373890&f=iphone&ci=20&msid=0FA91DDF-BF5B-4DA2-B05D-FA2032F30C6C2016-04-04-08-38594';
        return (
            <TouchableNativeFeedback onPress={()=>Actions.WebView({url:url})}>
            <View style={styles.container}>
                <Image source={{uri:this.props.image}} style={{width:120,height:100,borderRadius:10}}/>
                <Text style={{position:'absolute',bottom:30,color:'white',backgroundColor:'orange',borderBottomRightRadius:4,borderTopRightRadius:4,padding:2}}>{this.props.dec}</Text>
                <Text>{this.props.text}</Text>
            </View>
            </TouchableNativeFeedback>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        height:120,
        width:120,
        margin:7,
    },
});
